Lossy compression methods for still images, pictures or video signal frames usually cause distortion of the still image, the picture or the video signal frame. This means that there may be a difference between the values of corresponding pixels or video samples in a source signal and a reconstructed signal. The difference between the values of corresponding pixels or video samples in a source and a reconstructed signal is usually denoted as error.
In many standardized video codecs, e.g. H.264/AVC and H.265/HEVC, there are two main sources of distortion: the quantization, wherein the quantization strength may be defined by a quantization parameter (QP), and the in-loop adaptive deblocking filter (ADF).
The error between the values of corresponding pixels or video samples in a source signal and a reconstructed signal are usually compensated using two mechanisms: decreasing the value of the quantization parameter and the negative impact of the in-loop adaptive deblocking filter on error values of pixels or video samples located in near-boundary regions, and directly compensating for the errors.
For emerging video coding standards, e.g. high efficiency video coding (HEVC), two methods for direct compensation of the errors are proposed. The first one is called sample adaptive offset (SAO), and the second one is called adaptive loop filter (ALF).
In the case of SAO, if the magnitude of a pixel or video sample after applying an SAO offset is not restricted, artifacts caused by impulse noise, e.g. salt and pepper noise, can result.
The main reason of appearing noise of such kind is that the difference between the magnitude of a pixel or video sample under consideration and its neighboring pixels or video samples is too high. In order to alleviate this problem, video coding standards, e.g. the H.265/HEVC standard, constrain the maximum absolute value that can be assigned to offsets. Therefore, the potentially achievable coding gain is limited. Hence, it is a problem how to avoid impulse noise without a loss in the coding gain.
In P. List, A. Joch, J. Lainema, G. Bjøntegaard, M. Karczewicz, “Adaptive Deblocking Filter”, IEEE Transactions on Circuits and Systems for Video Technology, Vol. 13, No. 7, July 2003, pp. 614-619, pixel or video sample classification using 1-dimensional patterns is performed.
In K. McCann, W.-J. Han, L-K. Kim, J.-H. Min, E. Alshina, A. Alshin, T. Lee, J. Chen, V. Seregin, S. Lee, Y.-M. Hong, M.-S. Cheon, N. Shlyakhov, “Samsung's Response to the Call for Proposals on Video Compression Technology”, Contribution to JCT-VC meeting, JCTVC-A124, Dresden, April 2010, the method of extreme correction is described. This method uses a set of pre-defined 2-dimensional patterns in order to classify pixels or video samples of the reconstructed image.
In A. Fuldseth, G. Bjøntegaard, “SAO with LCU-based syntax”, Cisco's contribution to JCT-VC meeting, JCTVC-H0067, San Jose, February 2012, it is proposed not to encode offset magnitudes but to fix their values to either 1 or −1 depending on the category.